import Vue from 'vue'
import App from './App.vue'
import axios from 'axios'
import VueRouter from 'vue-router'
import MyGoodsSearch from './components/MyGoodsSearch'
import MyUserInfo from './components/MyUserInfo'
import MyGoodsList from './components/MyGoodsList'

axios.defaults.baseURL = 'https://www.escook.cn'
import 'bootstrap/dist/css/bootstrap.css'
import './assets/fonts/iconfont.css'

Vue.config.productionTip = false
Vue.prototype.$axios = axios
Vue.use(VueRouter)
const routes = [
  {
    path: '/',
    redirect: '/goodlist',
  },
  {
    path: '/goodsea',
    name: 'goodsea',
    component: MyGoodsSearch,
  },
  {
    path: '/gooduser',
    name: 'gooduser',
    component: MyUserInfo,
  },
  {
    path: '/goodlist',
    name: 'goodlist',
    component: MyGoodsList,
  },
]
const router = new VueRouter({
  routes,
})

new Vue({
  router,
  render: (h) => h(App),
}).$mount('#app')
